package com.itheima.CharStream.CharInputStream;



import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class inputDemo2 {
    public static void main(String[] args) throws IOException {
        FileReader fr2 = new FileReader("day623-24CharStream\\xx.txt");

        char[] chars = new char[1024];
        int len;        //表示的是有效字符个数

        while ((len=fr2.read(chars))!=-1){
            System.out.println((new String(chars, 0, len)));
        }


        fr2.close();
    }
}
